Im trying to make a rickroll prank game (yea yea)
But the script to play 'Never Gonna Give You Up' isn't working. Im fairly new to if statements myself, sorry if I seem stupid to you.
Script:
local Player = game:GetService("Players").LocalPlayer function RickRoll() game.Workspace.Sound.Play() end if Player.PlayerAdded then wait(5) RickRoll() end
The PlayerAdded
signal is home to the Players
Service, you’re trying to reference it through a Player Object. It shouldn’t necessarily be used as a conditional either though, since it’s an RBXScriptSignal you can simply just run the code as an event:
local Players = game:GetService("Players") local Sound = workspace:WatForChild("Sound") local function RickRoll() wait(5); Sound:Play() end Players.PlayerAdded:Connect(RickRoll)