Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Roblox scripting help attempt to call a userdata value?

when i try to run this code the output is Players.4lve.Backpack.Speed Poition.Script:9: attempt to call a userdata value why?

script.Parent.Activated:Connect(function(player) local plr = script.Parent.Parent local hum = plr:WaitForChild("Humanoid") print(plr.Name)

script.Parent:Destroy()	
hum.WalkSpeed = 50
for i = 1,10 do
	local speed = game:GetService("Players")(plr.Name).PlayerGui.Boosts.Frame.Speed
	speed.Visible = true
	speed.Time.Text = i
end
hum.WalkSpeed = 16

end)

1 comment

0

Where are you defining "hum"?

1 answer

Try this script

	
Players = game:GetService("Players")
Players.PlayerAdded:Connect(function(player)
	print(player.Name .. "has joined the game")
	player.CharacterAdded:Connect(function(character)
		local humanoid = character:WaitForChild("Humanoid")
      character:WaitForChild("Humanoid").WalkSpeed = 30

end)
	end)
	
for i = 1,10 do
    local Players= game:GetService("Players").player.Name.PlayerGui.Boosts.Frame.Speed
    Players.Visible = true
    Players.Time.Text = i
end



1 comment

0

it´s a speed potion

This discussion is preserved as it was. New answers, comments, and votes are closed.