Ad
Log in to vote
0

Script gives player the tool, but the tool falls through the map where it was created?

Asked by 4 days ago

I know the title is weird but I dont know how else to explain this.

Here let me give you the run down real quick.

This script gives a play a tool after he presses a GUI button. The GUI is located under player.PlayerGui

It gives the player the gun but when the player equips the tool it just falls through the map and the place that it was created. This script works in studio but not in actual ROBLOX? Any ideas?

Heres the code

local replicatedstorage = game:GetService("ReplicatedStorage")

local player = game.Players.LocalPlayer
local button = script.Parent:FindFirstChild("Play")

button.MouseButton1Click:connect(function()
    local weapon1 = replicatedstorage:FindFirstChild("Thompson")
    local newweapon1 = weapon1
    newweapon1:Clone().Parent = player.Backpack
    newweapon1:Clone().Parent = player.StarterGear
    script.Parent.Parent:Destroy()
end)


0
If it isnt in a local script it may not work in actual roblox due to the difference between server scripts and local scripts. GalaxyFPS_Studios 0 — 4d

Hi.

Looks like you're using an ad blocker.

That's fine...

No, it really is.

Just, I mean, we put a lot of work into this site, you know?

It would be really really appreciated if you would turn off your ad blocker for our website...

We tried really hard to make our ads as unobtrusive as possible.

If you really hate ads, would you consider a $2 donation via Patreon?

Here's the link.

We love you. We hope you love us too.

.

..

...

Now back to your regularly scheduled Scripting Helpers....

...

..

.

Answer this question



Ad