Questions tagged [luau]

Luau is a scripting language based on Lua 5.1.

The luau language was developed by Roblox. The language's website is at https://luau-lang.org/.

123 questions
0
votes
1 answer

Roblox Studio: Setting the value of ViewportFrame CurrentCamera

Trying to copy the value of the CurrentCamera of a ViewportFrame to change the value of another ViewportFrame's Current Camera. -- Localscript item.MouseButton1Click:Connect(function() local EquippedItem =…
0
votes
1 answer

For some reason, My code can't make my player sit, and I need a solution for this

I want to make a game but there is something problem with it; I can't make the player sit for the game to start I tried to improve the code and I thought improving it would work but it didn't work I put the code in Script "Script" Here's the…
0
votes
1 answer

Is there a way I could call my own Lua library from Luau?

I am thinking if there is any way I could use Luau outside of Roblox for much more purposes. But its extremely limited standard library doesn't let me do anything big. Is there any way I could do something like this? -- main.luau local m =…
0
votes
0 answers

JSON Header "Content-Type" is not allowed

I have this code for Luau and I have been trying to solve this for a minute but my research has no end and no solution in sight. I send a signal through a remote and a local script with a string attached to it, someone help me or point me in a good…
Sjdinsd
  • 1
  • 1
0
votes
0 answers

How to add a Stat whenever player 1 makes the ball and then player 2 touches it using Server Sided Scripts

so i've been trying to add a stat using server sided scripts. so player 1 throws the ball and the player 2 touches the ball then player 1 gets that stat? function onTouched(hit) if not hit or not hit.Parent then return end local now =…
0
votes
0 answers

How do I retrieve a user's Game ID using the Roblox presence API?

I am asking here since the Roblox Dev Forum does not let me post for some reason. Anyhow, I am trying to make a feature in my game which lets the player join their friend's game through the game itself from a simple search, however, when I make an…
Evil Twin
  • 1
  • 1
0
votes
1 answer

How can I customize the mouse cursor in Luau for Roblox using a local script and an rbxassetid image?

I'm trying to get the normal roblox cursor to customize it, using a local script, using luau. My code is this: local inputServ = game:GetService("UserInputService"); local players = game:GetService("Players"); local player =…
0
votes
1 answer

Proximity Prompt does not have errors but does not work

This may seem very easy but I am a beginner in scripting Roblox. There are no errors but the proximity prompt wasn't working. I tried to use the print function to test but it did not print either. Here is the code! (Also don't mind anything…
0
votes
0 answers

My simple physics system makes object shake instead of standing still

I am currently trying to make a system (for roblox) that is basically just a Vector3 that has physics and collision, it doesn't have volume it's literally just a vector position in 3d space. I've made a small amount of progress but I don't really…
xSwezan
  • 1
  • 1
0
votes
1 answer

:MoveTo() finishes before reaching the destination -- roblox

local ZombieHumanoid = script.Parent.Zombie local ZombieWizard = script.Parent local Places = game.Workspace.PlacesEnemy ZombieHumanoid.Died:Connect(function() ZombieWizard:Destroy() end) for Place=1, #Places:GetChildren() do …
AronasRR
  • 23
  • 3
0
votes
1 answer

attempt to perform arithmetic (sub) on Instance and number -- roblox

local HumanoidTaxi = script.Parent.Ally local TaxiB = script.Parent.Damage local Taxi = script.Parent local TweenService = game:GetService("TweenService") local Debounce = false local Places =…
AronasRR
  • 23
  • 3
0
votes
1 answer

Can't run function when trying to find ClickDetector

if I were to run correctbook.MouseClick:Connect(onTouch) it will work however when i try to do it with the array it doesn't run it, anything i'm missing or is it just not possible ? `local bookScript = script.Parent local books =…
Angel
  • 1
  • 2
0
votes
1 answer

Vector2 in dictionary doesn't work correctly?

I have made like a game where you have to escape an ancient pyramid and I had one stage where there are different pillars on the floor with Egyptian hieroglyphics on them and in front of of the player there is a sign that says an English word an at…
DonutDev
  • 15
  • 6
0
votes
1 answer

How to teleport model to a random box in array?

For whatever reason I can't seem to get my model to teleport inside one of the boxes. Also in workspace it's setup as Workspace Folder script Folder (named boxes) box-box10 local clickDetector = game.Workspace.Paper.ClickDetector local HS =…
Angel
  • 1
  • 2
0
votes
1 answer

Instance argument is nil remote event roblox

I'm creating a tower defense game and for some reason the defense argument I'm sending to the remote event to place the defence is nil. Local script under a button: local player = game.Players.LocalPlayer local mouse = player:GetMouse() local button…
sjaf553
  • 3
  • 2
1 2
3
8 9