Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Trying to make a variable with an asset that has spaces, how do i fix this?

Asked by 4 years ago

local BeginnerCharacter = game.Workspace["Hello, welcome to my maze, try to make it to the end, hold Shift to run if needed"] local debounce = false

game.Workspace.Model.FirstPressurePlate.Touched:Connect(function(hit)

if not debounce then
debounce = true
     game.Workspace.BeginnerCharacter:Destroy()
    game.Workspace.EerieThump:Play()
wait(10)
debounce = false    
end

end) so at the top I tried using a variable because if I did game.workspace["Hello, welcome to my maze, try to make it to the end, hold Shift to run if needed"] instead it would show an error. The variable I made works, or at least it should but it said this 10:23:01.928 - BeginnerCharacter is not a valid member of Workspace please help me thanks <3

1 answer

Log in to vote
0
Answered by 4 years ago
while workspace.Model.FirstPressurePlate.Touched:Wait() and not workspace["Hello, welcome to my maze, try to make it to the end, hold Shift to run if needed"]:Destroy() and workspace.EerieThump:Play() do end
Ad

Answer this question