fixed:
local football = game:GetService("ReplicatedStorage"):WaitForChild("Football")
local btn = script.Parent
local p = game.Players.LocalPlayer
btn.MouseButton1Click:Connect(function()
football:Clone().Parent = p.Backpack
end)
fixed:
local football = game:GetService("ReplicatedStorage"):WaitForChild("Football")
local btn = script.Parent
local p = game.Players.LocalPlayer
btn.MouseButton1Click:Connect(function()
football:Clone().Parent = p.Backpack
end)
When I click the button, I still donāt get the football
Are there errors in output?
Let me make a model of your game in my own game so I can test.
I am not sending people files to my game. It is already big so I donāt want to share files.
I am not asking for a file. Anyways, it works for me.
Setup:
Thatās how mine is. I donāt know why its not working for me
Aha! Thatās the problem!
Your football is in ServerScriptService! Put it in ReplicatedStorage.
oooooooooooooooooh I feel so stupid
Iāve tried to find the answer, but I canāt seem to find it.
Thank you!
A:
To make it so the player presses a button to put a football in their inventory, you can use the Button1Up
event on the button:
local football = ā ball path
local btn = script.Parent
local p = game.Players.LocalPlayer
btn.MouseButton1Up:Connect(function()
football:Clone().Parent = p.Backpack
end)
Is there a way to where you can only have 1 at a time and not spam the button for a million footballs?
New issue, now the power bar does not show up and I canāt throw the football
You should make the scripts activate once the player equips the tool.
local tool = script.Parent
local p = game.Players.LocalPlayer
local character = p.CharacterAdded:Wait()
repeat
wait()
until character:WaitForChild("Football")
-- code
Where would I place this script?
Hmmā¦ Could you please send me just your football tool, so I can tinker with it easier?
How would I do that exactly???
Right click the tool, āSave To Fileā, upload it to Dev Forum via this button.